home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 081 / omam_112.arc / RASMAM.DOC < prev    next >
Text File  |  1987-12-18  |  42KB  |  1,137 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                                      RASMAM
  8.                             Opus Message Area Manager
  9.                         (c) Copyright 1987 -- Roger Smith
  10.  
  11.                                   VERSION 1.12
  12.  
  13.                              ----- Small Print -----
  14.         RASMAM  is copyrighted. You are granted permission to use  RASMAM
  15.         and to copy and distribute it. Distributed copies may not be sold
  16.         and must not be modified. All distributed copies must contain the
  17.         executable file and this documentation. RASMAM is not  guaranteed
  18.         to do anything. The author will assume no liability for any  loss
  19.         incurred from the use of this program. Although, RASMAM has  been
  20.         tested on several PC compatibles. It may not work on some less PC
  21.         compatible MSDOS machines.
  22.                             -- End of Small Print --
  23.  
  24.  
  25.         RASMAM replaces several small utilities and one large batch  file
  26.         that  I've  been  using to manage message  areas  on  the  RSBBS.
  27.         RASMAM renumbers the message areas, creates message waiting lists
  28.         (like  OpusWait), and archives or deletes old messages.  It  also
  29.         manages  my  "Picture Gallery" and can be used to  automate  many
  30.         other tasks.
  31.  
  32.         The command to execute RASMAM is:
  33.  
  34.                         MAM script-file [/TERSE] [/LIST]
  35.  
  36.         The /TERSE option tells RASMAM to limit the amount of information
  37.         displayed. The /LIST option causes RASMAM to list the script file
  38.         as  it  is read. The script-file tells RASMAM what to do.  It  is
  39.         really  a simple programming language which is described  in  the
  40.         following sections.
  41.  
  42.         SCRIPT FILES
  43.  
  44.         RASMAM is controlled by a script or command file. This file tells
  45.         RASMAM  where  to  find system files that it  requires  and  what
  46.         actions to take in the message areas. The script file is an ASCII
  47.         text file that you can create with almost any text editor.  A few
  48.         sample scripts are included in the RASMAM distribution package.
  49.         Script files may include comments. Lines that begin with any one
  50.         of the following characters are ignored by RASMAM:
  51.  
  52.                     . , > @ ^ & * : ; ` ' ~ > < / ? - + = | \
  53.                                                              RASMAM -2-
  54.  
  55.  
  56.         You  may also use "pseudo-variables" or macros within the  script
  57.         file.  When RASMAM encounters a macro in a script, the  macro  is
  58.         expanded to its value. RASMAM has several macros built-in:
  59.  
  60.          [The names of the built-in macros have changed since version 1.01]
  61.  
  62.              var.     formerly        becomes
  63.  
  64.           #JULIAN#      #J#    -- the current day of the year (001..366)
  65.           #DAY#         #D#    -- the current day of the month (01..31)
  66.           #MONTH#       #M#    -- the current month (01..12)
  67.           #YEAR#        #Y#    -- the current year (87..99)
  68.  
  69.           $WEEKDAY$     $D$    -- the current weekday (SUN..SAT)
  70.           $MONTH$       $M$    -- the current month (JAN..DEC)
  71.  
  72.           $SCRIPT$      $C$    -- name of the current MAM configuration file
  73.  
  74.           %var%                -- value of specified environment variable
  75.  
  76.           %%                   -- %
  77.           ##                   -- #
  78.           $$                   -- $
  79.  
  80.         New built-in macros (added after version 1.01):
  81.  
  82.           #HOUR#              -- hour when MAM was run (00..23)
  83.           #MINUTE#            -- minute when MAM was run (00..59)
  84.           #AREA#              -- number of current message area (00..99)
  85.           #user name#         -- user number of specified user (0..???)
  86.  
  87.           $PATH$              -- path to current message area
  88.           $net/node$          -- Hex string NNNNnnn where NNNN is net and
  89.                               -- nnnn is node. For example,
  90.                               -- $366/14$ becomes 016E000E
  91.  
  92.         For  example,  if you use #DAY# in a RASMAM script,  it  will  be
  93.         replaced  by  two digits representing the day of  the  month.  On
  94.         September 9, 1987, the line:
  95.  
  96.           ARCHIVE KEEP 100 TO C:\OPUS\FILES\ARCHIVES\TEXT#YEAR#.$MONTH$
  97.  
  98.         Will be interpreted by RASMAM as:
  99.  
  100.               ARCHIVE KEEP 100 TO C:\OPUS\FILES\ARCHIVES\TEXT87.SEP
  101.                                                              RASMAM -3-
  102.  
  103.  
  104.               ----------------------------------------------------
  105.         DEFINE
  106.         Define/redefine macros
  107.  
  108.                              DEFINE macro definition
  109.  
  110.         You  may  define your own macros using the  DEFINE  command.  For
  111.         example:
  112.  
  113.           DEFINE opus c:\opus
  114.           DEFINE misc $opus$\misc
  115.           DEFINE files $opus$\files
  116.           DEFINE arcs $file$\archives
  117.  
  118.         After  the above DEFINE statements, you can use $FILES$  anywhere
  119.         in this script and it will be replaced by "C:\OPUS\FILES" or  use
  120.         $ARCS$  instead of "C:\OPUS\FILES\ARCHIVES" -- it makes  some  of
  121.         your lines shorter and makes changes easier.
  122.  
  123.         The  DEFINE  command may be used anywhere in the script  file.  A
  124.         macro may be redefined at any time. RASMAM allows up to 20 macros
  125.         to be defined.
  126.  
  127.         RASMAM  expands the lines as it reads them. It  handles  expanded
  128.         lines up to several hundred characters longs.
  129.  
  130.               ----------------------------------------------------
  131.         FILE LOG
  132.         Declares a log file
  133.  
  134.                                 FILE LOG filespec
  135.  
  136.         The  FILE  LOG  statement is optional. It  tells  RASMAM  to  log
  137.         messages  to the specified file. Don't use the same log  file  as
  138.         Opus.   All file names you give in a MAM script should  be  fully
  139.         qualified, i.e. you should specify the drive, path, and  complete
  140.         filename.
  141.  
  142.                            FILE LOG $opus$\log\mam.log
  143.  
  144.         In general, the LOG command should be entered somewhere near  the
  145.         start  of the script. But it may be used anywhere. If you use  it
  146.         more  than once, the current log file is closed and a new one  is
  147.         opened.
  148.                                                              RASMAM -4-
  149.  
  150.  
  151.               ----------------------------------------------------
  152.         LOG
  153.         Displays and logs a message
  154.  
  155.                                    LOG message
  156.  
  157.         The LOG command may be put anywhere in the file and will echo the
  158.         text following the command to the screen (if /TERSE is not  used)
  159.         and to the log file if any.
  160.  
  161.           LOG Running MAM $C$
  162.  
  163.               ----------------------------------------------------
  164.         FILE USER
  165.         Declares the user file
  166.  
  167.                                FILE USER filespec
  168.  
  169.         The  FILE USER statement is required to tell RASMAM the  name  of
  170.         your  user  file. It must appear before any AREA,  DELETE,  LOCK,
  171.         UNLOCK,  or NOTE commands and before any #user name# macro.
  172.  
  173.           FILE USER $opus$\user.bbs
  174.  
  175.               ----------------------------------------------------
  176.         PATH CUSTOM
  177.         Declares the custom welcome path
  178.  
  179.                               PATH CUSTOM file-path [KEEP]
  180.  
  181.         The  PATH  CUSTOM statement tells MAM where to  put  the  ###.BBS
  182.         files  that the WAIT and NOTE commands create. This will  usually
  183.         be  the same as Opus's system path unless you're using a  program
  184.         like CUSTOM4 to display the custom welcomes.
  185.  
  186.           PATH CUSTOM $opus$\
  187.  
  188.         If Opus finds a custom welcome (###.BBS) file in its system  path
  189.         for the current user, it will display the file before the  normal
  190.         welcome  file.  You  can use more than one PATH  CUSTOM  in  your
  191.         script  to  change  where  RASMAM places  the  custom  files  for
  192.         different  areas,  but in general you need to just use  one  PATH
  193.         CUSTOM before any WAIT, DELETE, or NOTE commands.
  194.  
  195.         The  KEEP  option is useful in some special  cases.  When  RASMAM
  196.         executes  the  PATH  CUSTOM command it  deletes  all  the  custom
  197.         welcomes  in the specified directory (1*.BBS, 2*.BBS,  ...).  The
  198.         KEEP option tells RASMAM not to delete the custom welcomes.  This
  199.         may  be  useful if your script is not  creating  message  waiting
  200.         lists, but is using the NOTE or DELETE commands.
  201.  
  202.         WARNING:  When  RASMAM deletes custom welcomes,  it  deletes  ALL
  203.         files with names like 1*.BBS, 2*.BBS, 3*.BBS, and so on to 9*.BBS.
  204.                                                              RASMAM -5-
  205.  
  206.  
  207.               ----------------------------------------------------
  208.         FILE ECHO
  209.         Declares the echo control file
  210.  
  211.                                FILE ECHO file-path
  212.  
  213.         The FILE ECHO statement tells RASMAM the name of your  Opus-style
  214.         Echo  control file that RASMAM uses to look up area  numbers  and
  215.         paths.  Make  sure  all areas that RASMAM  will  operate  on  are
  216.         defined  in the Echo control file. Opus doesn't mind if you  have
  217.         areas  listed  that are not echo areas. For RASMAM to work  in  a
  218.         message area, the area must be listed in the echo control file.
  219.  
  220.           FILE ECHO $opus$\nodelist\echo.ctl
  221.  
  222.         When  RASMAM  executes the FILE ECHO command, it reads  the  echo
  223.         file  to  build a table of your message area numbers  and  paths.
  224.         The FILE ECHO command must appear before any AREA commands.
  225.  
  226.               ----------------------------------------------------
  227.         FORMAT
  228.         Select Format of Messages Waiting List
  229.  
  230.                             FORMAT {A | B | C}
  231.  
  232.         The  FORMAT command tells MAM how to format the messages  waiting
  233.         list.  Currently, three formats are supported.  The first (FORMAT
  234.         A)  is  faster  and is the default.
  235.  
  236.         FORMAT  A tells RASMAM to list waiting messages as follows:
  237.  
  238.              1  101
  239.              2  110
  240.  
  241.         The area number is followed by the message number.
  242.  
  243.         FORMAT B gives more information:
  244.  
  245.            General Chatter Message Area (1)
  246.              Message   101 from Roger Smith
  247.              Message   110 from James Young
  248.  
  249.         The  description of the message area is read from the DIR.BBS  in
  250.         the  message area directory.  If DIR.BBS is not found,  then  the
  251.         EchoMail area name is used instead of the description.
  252.  
  253.         FORMAT C gives even more information about waiting messages:
  254.  
  255.            General Chatter Message Area (1)
  256.              Message: 101
  257.              From   : Roger Smith
  258.              Date   : 01-SEP-87 01:25:47
  259.              Subject: Re:RASMAM Formats
  260.                                                              RASMAM -6-
  261.  
  262.  
  263.               ----------------------------------------------------
  264.         DATE
  265.         Select Date Type
  266.  
  267.                             DATE {ARRIVED | WRITTEN}
  268.  
  269.         The  DATE command allows you to select how RASMAM will  determine
  270.         the age of a message.  DATE ARRIVED tells RASMAM to use the  date
  271.         the message arrived on your system.  DATE WRITTEN tells RASMAM to
  272.         use the date the message was created.
  273.  
  274.         MESSAGES
  275.         Sets high message number
  276.  
  277.                                       *****
  278.  
  279.         The MESSAGES command is no longer needed and if used will produce
  280.         a  warning.  RASMAM will only handle messages numbered 1  through
  281.         2000.   If you have any messages which are numbered greater  than
  282.         2000  then  you'll need to purge the message area to  reduce  the
  283.         number of messages to less than 2000 then renumber using  another
  284.         renumbering utility such as RENUM.
  285.  
  286.               ----------------------------------------------------
  287.         FILE HEADER
  288.         Declares the messages waiting header
  289.  
  290.                         FILE HEADER file-spec [file-spec]
  291.  
  292.         The FILE HEADER statement specifies the name of a file which will
  293.         be placed in the custom welcome files before the list of  waiting
  294.         messages. The FILE HEADER statement is needed only if you use the
  295.         WAIT  command to create messages waiting lists. If two files  are
  296.         listed,  MAM  will use the second if the user has  ANSI  graphics
  297.         enabled.
  298.  
  299.           FILE HEADER $misc$\opuswait.hdr $misc$\graphics.hdr
  300.  
  301.               ----------------------------------------------------
  302.         FILE TRAILER
  303.         Declares the messages waiting trailer
  304.  
  305.                              FILE TRAILER file-spec
  306.  
  307.         The FILE TRAILER command tells MAM the name of a file  containing
  308.         text  to append to each existing custom welcome file.  The  files
  309.         are  appended  when  RASMAM executes the  FILE  TRAILER  command,
  310.         therefore the command should appear after all AREA commands.
  311.  
  312.           FILE TRAILER $misc$\opuswait.trl
  313.                                                              RASMAM -7-
  314.  
  315.  
  316.               ----------------------------------------------------
  317.         LOCK
  318.         UNLOCK
  319.         Stop/Start Check Messages Waiting for User
  320.  
  321.                                 LOCK {user|priv}
  322.                                UNLOCK {user|priv}
  323.  
  324.         The  LOCK command tells MAM to stop listing messages waiting  for
  325.         the  specified  user (or group of users by  privilege)  until  an
  326.         UNLOCK  command is issued for the user (or users).  For  example,
  327.         suppose you have a regular caller, James Young, that is the Sysop
  328.         of  another  BBS. His board participates in the  MEADOW  echomail
  329.         conference so you don't want MAM to list messages for him waiting
  330.         in the MEADOW area. You can use the following LOCK command before
  331.         checking MEADOW:
  332.  
  333.                                 LOCK James Young
  334.  
  335.         If you don't want MAM to list messages waiting for TWITS, use:
  336.  
  337.                                    LOCK Twits
  338.  
  339.         The  UNLOCK  command  reverses the effect of  the  LOCK  command.
  340.         Following  up  on the example earlier, you  should  UNLOCK  James
  341.         Young  after scanning MEADOW so he will be notified  of  messages
  342.         waiting in other areas:
  343.  
  344.                                UNLOCK James Young
  345.  
  346.               ----------------------------------------------------
  347.         AREA
  348.         Begins area section
  349.  
  350.                               AREA area-name [ECHO]
  351.  
  352.         Use  the  AREA  command  to define the  area  for  the  following
  353.         commands.  Add  the word ECHO after the name if the  area  is  an
  354.         echomail  area. The area name must match the area name from  your
  355.         echo  control file. The AREA command must appear after  the  FILE
  356.         ECHO command.
  357.  
  358.                                 AREA general ECHO
  359.                                                              RASMAM -8-
  360.  
  361.  
  362.               ----------------------------------------------------
  363.         WAIT
  364.         Enables creating of message waiting lists
  365.  
  366.                                       WAIT
  367.  
  368.         The WAIT command tells RASMAM to create message waiting files for
  369.         the  current  area (like OpusWait). These are  "custom  welcomes"
  370.         that  are displayed when the user logs on and show him  what  new
  371.         messages are waiting for him. The WAIT command must appear in the
  372.         section between an AREA command and its END AREA.
  373.  
  374.           WAIT
  375.  
  376.               ----------------------------------------------------
  377.         RENUM
  378.         Enable renumbering of messages
  379.  
  380.                              RENUM [SUBJECT] [CHAIN]
  381.  
  382.         The  RENUM command tells RASMAM to renumber the messages  in  the
  383.         current  message area. Adding the word SUBJECT after the  command
  384.         causes  RASMAM  to  create a reply chain  based  on  the  message
  385.         subjects.  This  restores  the  reply chain  that  is  lost  when
  386.         echomail  messages are sent. The CHAIN option is similar,  except
  387.         the  last  message  in a subject chain is  linked  to  the  first
  388.         message  in  the next chain. This forms a threaded  message  base
  389.         like  that available on other BBSs, The "+" and "-" commands  can
  390.         be  used  to perform a "threaded read" of the messages,  If  both
  391.         CHAIN  and SUBJECT are given it's the same as just CHAIN. If  you
  392.         don't use the CHAIN or SUBJECT options, the original reply  chain
  393.         is rebuilt. RENUM must appear between an AREA command and its END
  394.         AREA.
  395.  
  396.           RENUM SUBJECT
  397.  
  398.               ----------------------------------------------------
  399.         KILL
  400.         Delete messages based on number of messages or age of messages
  401.  
  402.          KILL [PRIVATE] [RECEIVED] [WHEN i] [DAYS j] [SKIP k] [KEEP l]
  403.  
  404.         The  PRIVATE option specifies that the command will  only  affect
  405.         messages  which are private. The RECEIVED option  specifies  that
  406.         the  command will only delete messages which have been read.  The
  407.         WHEN  option specifies that the KILL command should execute  only
  408.         when there are more than i messages in the area. The DAYS  option
  409.         allows  you  to specify that only messages older than j  days  be
  410.         killed.  The SKIP option specifies that the KILL  command  should
  411.         not  delete  any of the first k messages in the  area.  The  KEEP
  412.         option specifies that the last l messages in the area will not be
  413.         killed.
  414.  
  415.         KILL must appear in an AREA section (between an AREA command  and
  416.         an END AREA). More than one KILL command may be used in a section
  417.                                                              RASMAM -9-
  418.  
  419.  
  420.         and KILL commands may me intermixed with ARCHIVE commands.
  421.  
  422.         Here are a few examples of KILL commands:
  423.  
  424.           Kill all received messages in the area:
  425.             KILL RECEIVED
  426.  
  427.           Kill all messages over 90 days old except the first 5 messages:
  428.             KILL DAYS 90 SKIP 5
  429.  
  430.           Kill all messages over 30 days old keeping at least 10:
  431.             KILL DAYS 30 KEEP 10
  432.  
  433.           Kill all received messages over 30 days old:
  434.             KILL RECEIVED DAYS 30
  435.  
  436.           Kill all received messages AND kill all over 30 days old: (use
  437.           two commands!):
  438.             KILL RECEIVED
  439.             KILL DAYS 30
  440.  
  441.           Kill all private messages that have been received:
  442.             KILL RECEIVED PRIVATE
  443.  
  444.           Trim a message area down to the number of messages specified in a
  445.           DOS environment variable (use the SET command from DOS to set the
  446.           value of MEADOW [i.e. "SET MEADOW=200"]):
  447.             KILL KEEP %meadow%
  448.  
  449.         The KILL command can do things many different ways. You may  wish
  450.         to  backup  all  your messages to a  temporary  directory  before
  451.         testing your KILL command(s).
  452.  
  453.               ----------------------------------------------------
  454.         ARCHIVE
  455.         Move messages to a text file
  456.  
  457.           ARCHIVE [PRIVATE] [RECEIVED] [DAYS i] [SKIP j] [KEEP k] [PRIVATE] TO file
  458.  
  459.         The RECEIVED, DAYS, SKIP, and PRIVATE options work just like when
  460.         used with KILL. The TO clause tells MAM what file is to hold  the
  461.         text of the messages which are removed from the message area. The
  462.         ARCHIVE command must appear in an AREA block.
  463.                                                              RASMAM -10-
  464.  
  465.  
  466.         Here are a few examples of the ARCHIVE command:
  467.  
  468.           Maintain 100 messages in area. Archive any others to a file
  469.           called CHATyy.mmm where YY is the year, and mmm is the month. A
  470.           new archive file will automatically be created each month so you
  471.           will have CHAT87.SEP, CHAT87.OCT, CHAT87.NOV and so on.
  472.             ARCHIVE KEEP 100 TO $ARCS$\CHAT#YEAR.$MONTH$
  473.  
  474.           Archive received private messages into a file:
  475.             ARCHIVE PRIVATE RECEIVED TO PRIV.TXT
  476.  
  477.           Prune messages down to 75 when there are 100 or more in the area:
  478.             ARCHIVE WHEN 100 KEEP 75 TO $arcs$\chat#YEAR#.#JULIAN#
  479.  
  480.         You  can use mix ARCHIVE and KILL statements for each  area.  The
  481.         KILL  and ARCHIVE commands are executed in the order they  appear
  482.         in the script. RENUM and WAIT aren't executed until after all the
  483.         KILL and ARCHIVE commands in the area.
  484.  
  485.               ----------------------------------------------------
  486.         END AREA
  487.         Marks the end of an area section
  488.  
  489.                                     END AREA
  490.  
  491.         The  END  AREA statement marks the end of an area  section.  When
  492.         RASMAM  reads the END AREA statement, it renumbers  and  produces
  493.         the  messages  waiting lists if the RENUM or WAIT  options  where
  494.         used.
  495.  
  496.         The AREA command and its WAIT, RENUM, KILL, and ARCHIVE  commands
  497.         should be repeated for each area you wish to process.
  498.  
  499.           AREA records ECHO
  500.             WAIT
  501.             RENUM SUBJECT
  502.             ARCHIVE KEEP 150 TO $arcs$\music#YEAR#.$MONTH$
  503.           END AREA
  504.  
  505.               ----------------------------------------------------
  506.         NOTE
  507.         Sends a custom welcome
  508.  
  509.                   NOTE {PREFIX|SUFFIX} file-spec TO {user|priv}
  510.  
  511.         The  NOTE  command allows you to add a note to a  custom  welcome
  512.         screen  for  a  certain user (or group of users  based  on  their
  513.         privilege  level). NOTE PREFIX adds the note before any text  (if
  514.         any)  already in the custom welcome screen. NOTE SUFFIX adds  the
  515.         file to the end of the custom welcome.
  516.  
  517.         You may specify a user to receive the custom welcome or specify a
  518.         privilege  to  have  the  message sent  to  all  users  with  the
  519.         specified  privilege.  The privilege is TWIT,  DISGRACE,  NORMAL,
  520.         PRIV, EXTRA, ASST, or SYSOP.
  521.                                                              RASMAM -11-
  522.  
  523.  
  524.  
  525.           The following will send the file TWIT.TXT to all twits.
  526.             NOTE SUFFIX $misc$\twit.txt TO TWIT
  527.  
  528.           The follow sends a message to a certain person:
  529.             NOTE PREFIX $misc$\friends.txt TO David Hicks
  530.  
  531.               ----------------------------------------------------
  532.         DELETE
  533.         Delete custom welcomes
  534.  
  535.                                DELETE {user|priv}
  536.  
  537.         The  DELETE command deletes any custom welcome intended  for  the
  538.         specified user or group of users (by privilege level). If someone
  539.         who  calls  your  board  participates in  one  of  your  echomail
  540.         conferences  on  a different system, he may have a long  list  of
  541.         messages waiting even though he's seen them on his board. You can
  542.         use  DELETE to delete the welcome screen for that caller. If  you
  543.         have entered "ALL" in your user list, you may wish to delete  the
  544.         messages waiting for ALL.
  545.  
  546.           DELETE All
  547.  
  548.         Here's a few more examples of the DELETE command:
  549.  
  550.           Remove any custom welcomes waiting for Roger Smith:
  551.             DELETE Roger Smith
  552.  
  553.           Remove custom welcomes for every user with SYSOP privilege (to
  554.           delete the custom welcome for a user named SYSOP use "ERASE
  555.           $custom$\#sysop#.BBS" where $custom$ is the path to your custom
  556.           welcomes):
  557.             DELETE Sysop
  558.  
  559.               ----------------------------------------------------
  560.         INCLUDE
  561.         Include a script file
  562.  
  563.                                INCLUDE script-file
  564.  
  565.         The INCLUDE command causes RASMAM to begin reading the  specified
  566.         script  file.   When the end of that script  is  reached,  RASMAM
  567.         resumes reading the current script file.  Just a word of warning,
  568.         the INCLUDE command is slow.
  569.  
  570.  
  571.           INCLUDE c:\opus\include.mam
  572.  
  573.         The  name  of the script file should be fully  qualified  with  a
  574.         drive, path. and extension specified.  INCLUDEs may be nested  up
  575.         to 10 levels.
  576.                                                              RASMAM -12-
  577.  
  578.  
  579.               ----------------------------------------------------
  580.         IF
  581.         END IF
  582.         Conditionally execute commands
  583.  
  584.                            IF [@NOT] expression [THEN]
  585.                                 ... commands ...
  586.                            END IF
  587.  
  588.         The  IF  and END IF commands allow you to  conditionally  execute
  589.         portions of your script file.
  590.  
  591.         The conditional expression is:
  592.  
  593.           value1 == value2  (or =)  true if value1 equals value2
  594.           value1 != value2  (or <>) true if value1 doesn't equal value2
  595.           value1 < value2           true if value1 less than value2
  596.           value1 > value2           true if value1 greater than value2
  597.           value1 <= value2          true if value1 less than or equal to value2
  598.           value1 >= value2          true if value1 greater than or equal to value2
  599.           value1 IN value2          true if value1 is contained in value2
  600.           @EXISTS filespec          true if filespec exists
  601.  
  602.         Values  are all one word (no spaces). @NOT inverts the result  of
  603.         the  condition.   You MUST put a space before and one  after  the
  604.         operator.
  605.  
  606.         Here are some examples of IF/END IF commands:
  607.  
  608.           IF $MONTH$ == JAN THEN
  609.             LOG It is January.
  610.           END IF
  611.  
  612.           LOG IF/END IFs may be nested up to 32767 levels
  613.           IF @EXISTS c:\opus\system99.bbs THEN
  614.             IF $WEEKDAY$ IN TUETHU THEN
  615.               LOG It is Tuesday or Thursday ($WEEKDAY$) and SYSTEM99.BBS exists
  616.             END IF
  617.             IF $MONTH$ <> JAN THEN
  618.               LOG System99.BBS exists, but the month is not January
  619.             END IF
  620.           END IF
  621.  
  622.           IF @NOT $MONTH$#YEAR# == JAN87
  623.             LOG It is NOT January 1987
  624.           END IF
  625.                                                              RASMAM -13-
  626.  
  627.  
  628.               ----------------------------------------------------
  629.         ERASE
  630.         Deletes the specified file or files.
  631.  
  632.                                  ERASE filespec
  633.  
  634.         The  ERASE  command deletes the files that  match  the  specified
  635.         filespec. Wildcards may be used. For example,
  636.  
  637.           Delete BULLETIN.BBS and BULLETIN.GBS in C:\OPUS\MISC:
  638.             ERASE c:\opus\misc\bulletin.?bs
  639.  
  640.           Delete the custom welcome waiting for the user named "SYSOP":
  641.             ERASE c:\opus\#sysop#.BBS
  642.  
  643.               ----------------------------------------------------
  644.         ADD
  645.         Concatenate files
  646.  
  647.                     ADD filespec TO filespec GIVING filespec
  648.  
  649.         The ADD command concatenates (adds) two files and puts the result
  650.         in  a  third file. The output file is overwritten if  it  exists.
  651.         The  output file may be the same file as one of the  files  being
  652.         concatenated.
  653.  
  654.         For example,
  655.  
  656.           Add a file to the front of BULLETIN.BBS:
  657.             ADD $misc$\bull1.bbs TO $misc$\bulletin.bbs GIVING $misc$\bulletin.bbs
  658.  
  659.               ----------------------------------------------------
  660.         SHELL
  661.         Execute a DOS command
  662.  
  663.                                SHELL command-line
  664.  
  665.         The  SHELL  command  executes a DOS command.  The  SHELL  command
  666.         requires DOS 3.1 or higher.
  667.  
  668.           Display a directory:
  669.             SHELL dir $misc$
  670.  
  671.           Execute a batch file called NODEFIX:
  672.             SHELL nodefix
  673.  
  674.           Extract a file from an archive:
  675.             SHELL echo N | arc x c:\opus\files\next\incoming.arc *.txt
  676.                                                              RASMAM -14-
  677.  
  678.  
  679.               ----------------------------------------------------
  680.                                  PICTURE GALLERY
  681.               -----------------------------------------------------
  682.  
  683.         On  the  Main  Menu  of the RSBBS is  an  option  called  Picture
  684.         Gallery.  It's  really the Editorial command renamed. I  use  the
  685.         following  RASMAM commands to make different  pictures  available
  686.         for display each day.
  687.  
  688.               ----------------------------------------------------
  689.         ARC
  690.         PKARC
  691.  
  692.                                        ARC
  693.                                        or
  694.                                       PKARC
  695.  
  696.         The  ARC  and  PKARC commands select  the  archive  utility  that
  697.         RASMAM's  Picture Gallery commands will use to read the  list  of
  698.         picture files and to extract pictures.
  699.  
  700.         ARC tells RASMAM to use SEA's arc utility (PKARC selects PKWARE's
  701.         program).  Your copy of ARC (or PKARC and PKXARC) must be in  the
  702.         current path.
  703.  
  704.               ----------------------------------------------------
  705.         PATH TEMP
  706.         Declare a directory for temporary files
  707.  
  708.                                PATH TEMP directory
  709.  
  710.         The PATH TEMP command tells RASMAM the path to a directory  where
  711.         it should create its temporary files. RASMAM uses this  directory
  712.         to  store  the  picture file that it extracts  from  an  archive.
  713.         After  it finishes, RASMAM deletes the file from  the  directory.
  714.         Therefore,  to  avoid the possibility of  RASMAM  overwriting  an
  715.         existing  file,  create a temporary directory just  for  RASMAM's
  716.         use.
  717.  
  718.               ----------------------------------------------------
  719.         PICTURE FILE
  720.         Declare a picture archive file
  721.  
  722.                               PICTURE FILE filespec
  723.  
  724.         PICTURE  FILE  tells  RASMAM the name of  an  archive  containing
  725.         pictures.  RASMAM will read the names of the picture  files  from
  726.         the archive.
  727.                                                              RASMAM -15-
  728.  
  729.  
  730.               ----------------------------------------------------
  731.         PICTURE HEADER
  732.         PICTURE TRAILER
  733.         PICTURE INDEX
  734.  
  735.                              PICTURE HEADER filespec
  736.                              PICTURE TRAILER filespec
  737.                              PICTURE INDEX filespec
  738.  
  739.         PICTURE HEADER supplies the name of a file that will be  prefixed
  740.         to any picture file that RASMAM creates.
  741.  
  742.         PICTURE TRAILER supplies the name of a file that will be appended
  743.         to any picture file that RASMAM creates.
  744.  
  745.         PICTURE  INDEX  supplies the name of a file that RASMAM  uses  to
  746.         keep track of the last picture it displayed.
  747.  
  748.               ----------------------------------------------------
  749.         PICTURE NEXT
  750.         PICTURE RANDOM
  751.  
  752.                         PICTURE {NEXT|RANDOM} TO filespec
  753.  
  754.         PICTURE  NEXT  chooses the next picture in  the  current  picture
  755.         archive and sends it to the specified file (adding the header and
  756.         trailer if any).
  757.  
  758.         PICTURE  RANDOM  chooses  a picture at random  from  the  current
  759.         picture archive file and sends it to the specified file.
  760.  
  761.         Here's how I use RASMAM's Picture Gallery commands:
  762.  
  763.           ; Handle ANSI pictures -- I've changed the E)ditorial command to
  764.           ; P)icture Gallery on Opus's Main Menu.
  765.  
  766.           PICTURE FILE $misc$\ansi.arc
  767.           PICTURE HEADER $misc$\ansi.hdr
  768.           PICTURE TRAILER $misc$\ansi.trl
  769.           PICTURE INDEX $misc$\ansi.idx
  770.           PICTURE NEXT TO $misc$\edtorial.gbs
  771.  
  772.           ; Handle ASCII pictures
  773.  
  774.           PICTURE FILE $misc$\ascii.arc
  775.           PICTURE HEADER $misc$\ascii.hdr
  776.           PICTURE TRAILER $misc$\ascii.trl
  777.           PICTURE INDEX $misc$\ascii.idx
  778.           PICTURE NEXT TO $misc$\edtorial.bbs
  779.                                                              RASMAM -16-
  780.  
  781.  
  782.                             RASMAM Programming Notes
  783.  
  784.         RASMAM commands form a simple programming language. Although  the
  785.         RASMAM  script  looks  similar to the control files  used  by  my
  786.         earlier  programs (such as OpusWait), but those  programs  simply
  787.         read  the  control file to get the values for  certain  variables
  788.         such as message paths. RASMAM actually interprets each command as
  789.         it  is read. I've tried to make RASMAM as flexible  as  possible.
  790.         The  commands may be combined in almost any order.  Commands  may
  791.         be  used in ways that I haven't envisioned. I recommend that  you
  792.         start with a simple script and expand it slowly, taking the  time
  793.         to observe the effects of each change.
  794.  
  795.         If  you have any questions or comments, feel free to  contact  me
  796.         via  FidoMail (366/14) or U.S. Snail. I've got some  grand  plans
  797.         for more enhancements. Some have already been written, but I left
  798.         them  out  of RASMAM for fear of introducing bugs  (eeek!).   I'd
  799.         appreciate  hearing what you think of RASMAM and what you'd  like
  800.         to see it do in the future.
  801.  
  802.         My U.S. Mail address is:
  803.  
  804.            Roger Smith, Jr.
  805.            1325 Greendale Ave. #29
  806.            Ft. Walton Beach, FL  32548
  807.  
  808.         (P.S. Just in case you've heard otherwise -- Ft. Walton Beach  IS
  809.         the home of the world's whitest beaches!)
  810.  
  811.  
  812.                                   Contributions
  813.  
  814.         When I released RASMAM I included a note which said that I  would
  815.         accept contributions from those of you using RASMAM.  I  received
  816.         over  $200  in contributions.  They came at a good time.   I  had
  817.         just  bought  the HST and (almost) over  extended  myself.   Many
  818.         thanks to those of you who sent checks.
  819.  
  820.         But,  I've  decided  that I really didn't write  RASMAM  to  make
  821.         money.  This is a hobby.  I do it for fun.  For that reason,  I'm
  822.         asking you not to send me any contributions.  Instead, if you use
  823.         RASMAM,  please  consider writing a check  to  Special  Olympics.
  824.         Don't  worry if it is only five or ten dollars.  Mail  the  check
  825.         to:
  826.  
  827.             Special Olympics Inc.
  828.             International Headquarters
  829.             1350 New York Avenue, N.W.
  830.             Suite 500
  831.             Washington, D.C.  20005
  832.  
  833.         If  you use RASMAM in a commercial environment, or on a BBS  that
  834.         requires  users  to  pay a fee, please  consider  a  donation  to
  835.         Special Olympics as mandatory.
  836.                                                               INDEX -17-
  837.  
  838.  
  839.         !=, 12
  840.  
  841.         ##, 2
  842.         ###.BBS, 4
  843.         #AREA#, 2
  844.         #D#, 2
  845.         #DAY#, 2
  846.         #HOUR#, 2
  847.         #J#, 2
  848.         #JULIAN#, 2
  849.         #M#, 2
  850.         #MINUTE#, 2
  851.         #MONTH#, 2
  852.         #user name#, 2, 4
  853.         #Y#, 2
  854.         #YEAR#, 2
  855.  
  856.         $$, 2
  857.         $C$, 2
  858.         $D$, 2
  859.         $M$, 2
  860.         $MONTH$, 2
  861.         $net/node$, 2
  862.         $PATH$, 2
  863.         $SCRIPT$, 2
  864.         $WEEKDAY$, 2
  865.  
  866.         %%, 2
  867.         %var%, 2
  868.  
  869.         /LIST, 1
  870.         /TERSE, 1, 4
  871.  
  872.         <, 12
  873.         <=, 12
  874.         <>, 12
  875.  
  876.         =, 12
  877.         ==, 12
  878.  
  879.         >, 12
  880.         >=, 12
  881.  
  882.         @EXISTS, 12
  883.         @NOT, 12
  884.  
  885.         ADD, 13
  886.         Add Files, 13
  887.         ANSI, 6
  888.         ARC, 14
  889.         ARCHIVE, 9, 10
  890.  
  891.                                                               INDEX -18-
  892.  
  893.  
  894.         Archive Messages
  895.           ARCHIVE Command, 9
  896.           Begin Area Block, 7
  897.           Date Type, 6
  898.           Echo Control File, 5
  899.           End Area Block, 10
  900.           Highest Message Number, 6
  901.         AREA, 4, 5, 6, 7, 8, 9
  902.         ARRIVED, 6
  903.         ASST, 10
  904.  
  905.         Built-in Macros, 2
  906.  
  907.         CHAIN, 8
  908.         Command File, 1
  909.         Comment Lines, 1
  910.         Concatenate Files, 13
  911.         Control
  912.           END IF, 12
  913.           Execute DOS Command, 13
  914.           Expressions, 12
  915.           IF, 12
  916.         CUSTOM, 4
  917.         Custom Welcomes
  918.           Custom Welcome Path, 4
  919.           DELETE Command, 11
  920.           Echo Control File, 5
  921.           FORMAT Command, 5
  922.           List Messages Waiting, 8
  923.           NOTE Command, 10
  924.           Trailer File, 6
  925.           User File, 4
  926.  
  927.         DATE, 6
  928.         DATE ARRIVED, 6
  929.         DATE WRITTEN, 6
  930.         DAYS, 8, 9
  931.         DEFINE, 3
  932.         DELETE, 4, 11
  933.         Delete File, 13
  934.         DISGRACE, 10
  935.  
  936.                                                               INDEX -19-
  937.  
  938.  
  939.         ECHO, 7
  940.         Echo Control File, 5
  941.         END AREA, 8, 10
  942.         END IF, 12
  943.         ERASE, 11, 13
  944.         Examples
  945.           ADD, 13
  946.           ARCHIVE, 10
  947.           ARCHIVE KEEP, 10
  948.           ARCHIVE PRIVATE, 10
  949.           ARCHIVE RECEIVED, 10
  950.           ARCHIVE WHEN, 10
  951.           AREA, 7, 10
  952.           Built-in Macros, 2
  953.           DEFINE, 3
  954.           DELETE, 11
  955.           END AREA, 10
  956.           ERASE, 13
  957.           FILE ECHO, 5
  958.           FILE HEADER, 6
  959.           FILE TRAILER, 6
  960.           FILE USER, 4
  961.           IF/END IF, 12
  962.           INCLUDE, 11
  963.           KILL, 9
  964.           KILL DAYS, 9
  965.           KILL KEEP, 9
  966.           KILL PRIVATE, 9
  967.           KILL RECEIVED, 9
  968.           KILL SKIP, 9
  969.           LOCK, 7
  970.           LOG, 4
  971.           LOG FILE, 3
  972.           NOTE PREFIX, 11
  973.           NOTE SUFFIX, 11
  974.           PATH CUSTOM, 4
  975.           Picture Gallery, 15
  976.           RENUM, 8
  977.           RENUM SUBJECT, 10
  978.           SHELL, 13
  979.           WAIT, 8, 10
  980.         Execute DOS Command, 13
  981.         Executing MAM, 1
  982.         EXTRA, 10
  983.  
  984.                                                               INDEX -20-
  985.  
  986.  
  987.         File Commands
  988.           Concatenate Files, 13
  989.           Delete File, 13
  990.           Picture Gallery, Extract Picture Fi, 15
  991.           Picture Gallery, Picture File, 14
  992.           Picture Gallery, Picture Header, 15
  993.           Picture Gallery, Picture Index, 15
  994.           Picture Gallery, Picture Trailer, 15
  995.           Picture Gallery, Specify Archive Ut, 14
  996.           Temporary File Path, 14
  997.         FILE ECHO, 5, 7
  998.         FILE HEADER, 6
  999.         FILE LOG, 3
  1000.         FILE TRAILER, 6
  1001.         FILE USER, 4
  1002.         FORMAT, 5
  1003.  
  1004.         IF, 12
  1005.         IN, 12
  1006.         INCLUDE, 11
  1007.  
  1008.         KEEP, 4, 8
  1009.         KILL, 8, 9, 10
  1010.         Kill Messages
  1011.           Begin Area Block, 7
  1012.           Date Type, 6
  1013.           Echo Control File, 5
  1014.           End Area Block, 10
  1015.           Highest Message Number, 6
  1016.           KILL Command, 8
  1017.  
  1018.         LOCK, 4, 7
  1019.         LOG, 4
  1020.         Log
  1021.           Display And Log Line, 4
  1022.           Open Log File, 3
  1023.  
  1024.         Macros, 2
  1025.         Macros
  1026.           Built-in, 2
  1027.           Definition, 3
  1028.         MESSAGES, 6
  1029.         Messages Waiting
  1030.           Check for Waiting Messages, 8
  1031.           Custom Welcome Path, 4
  1032.           Echo Control File, 5
  1033.           End Area Block, 10
  1034.           FORMAT Command, 5
  1035.           Header File, 6
  1036.           Highest Message Number, 6
  1037.           LOCK, 7
  1038.           Skip User, 7
  1039.           Trailer File, 6
  1040.           UNLOCK, 7
  1041.           User File, 4
  1042.  
  1043.                                                               INDEX -21-
  1044.  
  1045.  
  1046.         New Features (Version 1.12)
  1047.           ADD Command, 13
  1048.           ARC Command, 14
  1049.           Built-in Macros, 2
  1050.           DATE command, 6
  1051.           ERASE Command, 13
  1052.           FORMAT command, 5
  1053.           IF Command, 12
  1054.           INCLUDE Command, 11
  1055.           LOCK Command, 7
  1056.           MESSAGES Command, 6
  1057.           PATH TEMP Command, 14
  1058.           PICTURE FILE Command, 14
  1059.           Picture Gallery, 14
  1060.           PICTURE HEADER Comman, 15
  1061.           PICTURE INDEX Command, 15
  1062.           PICTURE NEXT Command, 15
  1063.           PICTURE RANDOM Command, 15
  1064.           PICTURE TRAILER Command, 15
  1065.           PKARC Command, 14
  1066.           SHELL Command, 13
  1067.           SKIP Option, 8, 9
  1068.           UNLOCK Command, 7
  1069.         NORMAL, 10
  1070.         NOTE, 4, 10
  1071.  
  1072.         OpusWait, 8, 16
  1073.  
  1074.         PATH CUSTOM, 4
  1075.         PATH TEMP, 14
  1076.         Picture File, 14
  1077.         Picture Gallery, 14
  1078.         Picture Gallery
  1079.           Extract Picture File, 15
  1080.           Picture File, 14
  1081.           Picture Header, 15
  1082.           Picture Index, 15
  1083.           Picture Trailer, 15
  1084.           Specify Archive Utility, 14
  1085.           Temporary File Path, 14
  1086.         PICTURE HEADER, 15
  1087.         PICTURE INDEX, 15
  1088.         PICTURE NEXT, 15
  1089.         PICTURE RANDOM, 15
  1090.         PICTURE TRAILER, 15
  1091.         PKARC, 14
  1092.         PKWARE, 14
  1093.         PKXARC, 14
  1094.         PREFIX, 10
  1095.         PRIV, 10
  1096.         PRIVATE, 8, 9
  1097.         Privilege, 10
  1098.         Programming Notes, 16
  1099.         Pseudo-variables, 2
  1100.  
  1101.                                                               INDEX -22-
  1102.  
  1103.  
  1104.         RECEIVED, 8, 9
  1105.         RENUM, 8, 10
  1106.         Renumber Messages
  1107.           Begin Area Block, 7
  1108.           Echo Control File, 5
  1109.           Enable Renumbering, 8
  1110.           End Area Block, 10
  1111.           Highest Message Number, 6
  1112.         Reply Chains, 8
  1113.  
  1114.         Script File, 1
  1115.         SEA, 14
  1116.         SHELL, 13
  1117.         SKIP, 8, 9
  1118.         Skip User, 7
  1119.         Specify Archive Utility, 14
  1120.         SUBJECT, 8
  1121.         SUFFIX, 10
  1122.         SYSOP, 10
  1123.  
  1124.         Temporary File Path, 14
  1125.         Threaded Message Base, 8
  1126.         TO, 9
  1127.         TWIT, 10
  1128.  
  1129.         UNLOCK, 4, 7
  1130.  
  1131.         Voluntary Contributions, 16
  1132.  
  1133.         WAIT, 4, 8, 10
  1134.         WARNING, 4
  1135.         WHEN, 8
  1136.         WRITTEN, 6
  1137.